/* @flow */

import * as nodeOps from 'web/runtime/node-ops'
import { createPatchFunction } from 'core/vdom/patch'
import baseModules from 'core/vdom/modules/index'
import platformModules from 'web/runtime/modules/index'

// the directive module should be applied last, after all
// built-in modules have been applied.
const modules = platformModules.concat(baseModules)
// createPatchFunction 方法调用的返回值 => patch
// createPatchFunction 是创建补丁函数
// 对默认核心patch函数进行扩展
// nodeOps 原生Dom操作
// modules 虚拟Dom 对attrs class dom-props events style transition 操作
// 将新旧虚拟Dom操作 转换成真实的Dom操作
export const patch: Function = createPatchFunction({ nodeOps, modules })
